package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 券码类型
 *
 * @author Atlakyn
 */
@EqualsAndHashCode(callSuper = true)
@TableName("d_coupon")
@Data
public class Coupon extends Model<Coupon> {
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("满减门槛")
    private BigDecimal full;

    @ApiModelProperty("满减数额")
    private BigDecimal reduction;

    @ApiModelProperty("有效期开始")
    private Date startTime;

    @ApiModelProperty("有效期结束")
    private Date endTime;

    @ApiModelProperty("领取当日起多少天有效")
    private Integer sameDay;

    @ApiModelProperty("0为固定有效期范围内可用1为领券后有效期内可用")
    private Integer dateType;

    @ApiModelProperty("本券价格")
    private BigDecimal buyNum;

    @ApiModelProperty("券类型")
    private Integer couponType;

    @ApiModelProperty("可用门店列表")
    private String storeList;

    @ApiModelProperty("不可用日期 0不限制 6周六 7周日 ...")
    private String disableDay;

    @ApiModelProperty("不可用文本")
    private String limitText;

    @ApiModelProperty("是否可以转赠")
    private Boolean give;
}
